![]() |
PATH![]() |
![]() ![]() |
Open is an application command that opens a file or files.
tell application "AppleWorks"
open file "Hard Disk:New Products:Mammoth:Product Intro"
end tell
tell application "AppleWorks"
open {file "Hard Disk:Letters:Offer", ¬
file "Hard Disk:Letters:Acceptance"}
end tell
Ask the Finder to open an Apple System Profiler report file. This is the equivalent of double-clicking on a file icon in the Finder, and launches the application if it isn't already running.
tell application "Finder"
open the file "Control Panel Report" of disk "Hard Disk"
end tell
To specify the name ( nameString ) of a file to open, use a string of the form " Disk : Folder1 : Folder2 :...: Filename " ; for details, see References to Files. You can also specify a string with only a filename (" Filename "). In this case, the application attempts to find the file in the current directory. (The current directory is typically the directory where the application was launched, the directory where the application last opened or saved a previous document, or another directory specified by the application. The current directory may be affected by settings in the General Controls control panel.)
If the file or files specified by referenceToFile is already open, it remains open and, typically, becomes the frontmost window (if it was not already).